//
//  FriendsGroupModel.m
//  QQ好友列表
//
//  Created by Jorn.Wu on 15/5/25.
//  Copyright (c) 2015年 Jorn.Wu. All rights reserved.
//

#import "FriendsGroupModel.h"
#import "FriendsModel.h"

@implementation FriendsGroupModel

- (instancetype)initWithDict:(NSDictionary *)dict{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];//注入所有值，分配到属性中
        
        NSMutableArray *modelArr = [NSMutableArray array];
        for (NSDictionary *dict in self.friends) {
            FriendsModel *fModel = [FriendsModel friendsWithDict:dict];//创建里面的model
            [modelArr addObject:fModel];
        }
        self.friends = modelArr;//放到组model中
        
    }
    return self;
}
+ (instancetype)friendsGroupWithDict:(NSDictionary *)dict{
    return [[self alloc]initWithDict:dict];
}
@end
